package gcb.metalsys.entity.cop;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2020-07-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ProPrice extends Model<ProPrice> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "price_id", type = IdType.AUTO)
    private Long priceId;

    private String productNumber;

    private String priceData;

    private String priceStartTime;

    private String priceEndTime;

    private Integer priceType;

    @TableField(exist = false)
    private String priceTypeName;
    @TableField(exist = false)
    private LocalDateTime priceDate;

    private BigDecimal price;

    public ProPrice(String productNumber, String priceData, String priceStartTime, String priceEndTime, Integer priceType, BigDecimal price) {
        this.productNumber = productNumber;
        this.priceData = priceData;
        this.priceStartTime = priceStartTime;
        this.priceEndTime = priceEndTime;
        this.priceType = priceType;
        this.price = price;
    }

    @Override
    protected Serializable pkVal() {
        return this.priceId;
    }

}
